home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Developer University / DUProjects / DataCopy / Sources / Selection.cpp < prev    next >
Encoding:
Text File  |  1996-04-08  |  2.3 KB  |  106 lines  |  [TEXT/CWIE]

  1. //    Release Version:    $ ODF 1 $
  2. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  3.  
  4. //========================================================================
  5. #ifndef SELECTION_H
  6. #include "Selection.h"    // CDataCopySelection
  7. #endif
  8.  
  9. #ifndef PART_H
  10. #include "Part.h"        // CDataCopyPart
  11. #endif
  12.  
  13. #ifndef FRAME_H
  14. #include "Frame.h"        // CDataCopyFrame
  15. #endif
  16.  
  17. #ifndef CONTENT_H
  18. #include "Content.h"
  19. #endif
  20.  
  21. // ----- Part Layer -----
  22. #ifndef FWUTIL_H
  23. #include "FWUtil.h"
  24. #endif
  25.  
  26. #ifndef FWITERS_H
  27. #include "FWIters.h"
  28. #endif
  29.  
  30. #ifndef FWPRESEN_H
  31. #include "FWPresen.h"
  32. #endif
  33.  
  34. // ----- Foundation Layer -----
  35. #ifndef FWSUSINK_H
  36. #include "FWSUSink.h"
  37. #endif
  38.  
  39. #ifndef FWSTREAM_H
  40. #include "FWStream.h"
  41. #endif
  42.  
  43. // ----- OpenDoc Includes -----
  44. #ifndef SOM_Module_OpenDoc_StdProps_defined
  45. #include <StdProps.xh>
  46. #endif
  47.  
  48. #ifndef SOM_ODShape_xh
  49. #include <Shape.xh>
  50. #endif
  51.  
  52. //========================================================================
  53. #ifdef FW_BUILD_MAC
  54. #pragma segment talker
  55. #endif
  56.  
  57. FW_DEFINE_AUTO(CDataCopySelection)
  58. //========================================================================
  59. CDataCopySelection::CDataCopySelection(Environment* ev, CDataCopyContent* content)
  60.   :    FW_CSelection(ev, false, false),
  61.     fDataCopyContent(content)
  62. {
  63.     FW_END_CONSTRUCTOR
  64. }
  65.  
  66. //-------------------------------------------------------------------------
  67. CDataCopySelection::~CDataCopySelection()
  68. {    
  69.     FW_START_DESTRUCTOR
  70. }
  71.  
  72. //-------------------------------------------------------------------------
  73. void 
  74. CDataCopySelection::CloseSelection(Environment* ev)
  75. {
  76. }
  77.  
  78. //-------------------------------------------------------------------------
  79. void 
  80. CDataCopySelection::ClearSelection(Environment* ev)
  81. {
  82.     fDataCopyContent->MyRemoveAllPizzas();
  83.     this->GetPresentation(ev)->Invalidate(ev);
  84. }
  85.  
  86. //-------------------------------------------------------------------------
  87. void 
  88. CDataCopySelection::SelectAll(Environment* ev)
  89. {
  90. }
  91.  
  92. //-------------------------------------------------------------------------
  93. FW_Boolean 
  94. CDataCopySelection::IsEmpty(Environment* ev) const
  95. {
  96.     unsigned long count = fDataCopyContent->MyGetPizzaList()->Count();
  97.     return (count == 0);            
  98. }
  99.  
  100. //-------------------------------------------------------------------------
  101. FW_CContent* 
  102. CDataCopySelection::GetSelectedContent(Environment* ev)
  103. {
  104.     return fDataCopyContent;
  105. }
  106.